import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';

export default defineConfig({
  plugins: [
    react({
      include: "**/*.{jsx,tsx,js,ts}",
      fastRefresh: false
    })
  ],
  define: {
    __REACT_DEVTOOLS_GLOBAL_HOOK__: '({ isDisabled: true })'
  },
  server: {
    port: 3000,
    cors: true
  },
  build: {
    target: 'esnext'
  },
  esbuild: {
    loader: "jsx",
    include: /src\/.*\.[tj]sx?$/,
    exclude: []
  },
  optimizeDeps: {
    esbuildOptions: {
      loader: {
        '.js': 'jsx',
      },
    }
  }
});
